﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="upload.aspx.cs" Inherits="UIDocument.upload" %>

<%@ Register src="UserControl/ucFileUpload.ascx" tagname="ucFileUpload" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="JavaScript/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="JavaScript/jquery-ui-1.8.20.min.js" type="text/javascript"></script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        #Button1
        {
            width: 112px;
        }
    </style>
   <script type="text/javascript">
       function fn() {
           var data = new FormData();
           data.append("form", $('input[type=file]')[0].files[0]);
           $.ajax({
    url: "HttpHandlerFile/FileUploder.ashx",
    data: data,
    contentType: false,
    processData: false,
    type:"POST"
   });

 }
</script>
</head>
<body>
    
    <form id="form1" runat="server"  enctype="multipart/form-data">
    <div>
    <table class="style1">
        <tr>
            <td>
                <input id="Text1" type="text" /></td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
              <%--  <input id="fileUpload" name ="fileUpload" type="file" />--%></td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <input id="Button1" type="button" value="Upload" onclick="fn();" /><br />
                <br />
                <br />
                <br />
                <uc1:ucFileUpload ID="ucFileUpload1" runat="server" />
                <br />
                <br />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>
